﻿<%@ Control Language="C#" AutoEventWireup="true" Inherits="SouthernLand.Controls.NhaDat.Dangtin"
    CodeBehind="Dangtin.ascx.cs" %>
<%@ Register TagPrefix="southern" Namespace="SouthernLand.Common.BOL.NhaDat" Assembly="SouthernLand" %>
<p>
    <asp:Panel runat="server" Visible="false" ID="PanelMsg">
        <div align="center">
            <asp:Label runat="server" ID="lblMsg" CssClass="lblMsg"></asp:Label>
        </div>
    </asp:Panel>
</p>
<asp:Panel Visible="true" runat="server" ID="PanelDangtin">
    <asp:ValidationSummary ValidationGroup="w4u_Raovat" runat="server" ID="valSummary"
        ShowMessageBox="true" ShowSummary="false" />
    <table align="center" cellpadding="8" cellspacing="0" border="0">
        <tr>
            <td class="td_Title" align="right" style="padding-top: 15px;">
                THÔNG TIN CHUNG
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td align="right" style="font-weight: bold">
                <span class="Required">*</span>
                <asp:Literal runat="server" ID="lLoaitin" Text="Loại tin rao" meta:resourcekey="Loaitin" />
                :
            </td>
            <td align="left">
                <southern:ddlLoaitin ID="dlLoaitin" ValidationGroup="w4u_Raovat" runat="server" Width="200"
                    CssClass="Textbox" />
                <asp:RequiredFieldValidator ValidationGroup="w4u_Raovat" runat="server" ID="Rqfvfileupload"
                    SetFocusOnError="true" ControlToValidate="dlLoaitin" ErrorMessage="Phải chọn Loại tin rao"
                    Display="none" />
            </td>
        </tr>
        <tr>
            <td align="right" style="font-weight: bold">
                <span class="Required">*</span>
                <asp:Literal runat="server" ID="lLoaiBDS" Text="Loại BĐS" meta:resourcekey="LoaiBDS" />
                :
            </td>
            <td align="left">
                <southern:ddlCategories ID="dlLoaiBDS" ValidationGroup="w4u_Raovat" runat="server"
                    Width="200" CssClass="Textbox" />
                <asp:RequiredFieldValidator runat="server" ValidationGroup="w4u_Raovat" ID="RequiredFieldValidator1"
                    SetFocusOnError="true" ControlToValidate="dlLoaiBDS" ErrorMessage="Phải chọn Loại BĐS"
                    Display="none" />
            </td>
        </tr>
        <tr>
            <td colspan="2" align="left">
                <asp:UpdatePanel ID="UpdatePanelDangtin" runat="server">
                    <ContentTemplate>
                        <table cellpadding="8" cellspacing="0" border="0">
                            <tr>
                                <td align="right" style="font-weight: bold">
                                    &nbsp;<span class="Required">*</span>
                                    <asp:Literal runat="server" ID="lTinhthanh" Text="Tỉnh/Thành Phố" meta:resourcekey="Tinhthanh" />
                                    :
                                </td>
                                <td align="left">
                                    <southern:ddlTinhThanh ID="dlTinhthanh" ValidationGroup="w4u_Raovat" AutoPostBack="true"
                                        OnSelectedIndexChanged="dlTinhThanh_SelectedIndexChanged" runat="server" Width="200"
                                        CssClass="Textbox" />
                                    <asp:RequiredFieldValidator runat="server" ValidationGroup="w4u_Raovat" ID="RequiredFieldValidator2"
                                        SetFocusOnError="true" ControlToValidate="dlTinhthanh" ErrorMessage="Phải chọn Tỉnh/Thành phố"
                                        Display="none" />
                                </td>
                            </tr>
                            <tr>
                                <td align="right" style="font-weight: bold">
                                    <asp:Literal runat="server" ID="lQuanhuyen" Text="Quận/Huyện" meta:resourcekey="Quanhuyen" />
                                    :
                                </td>
                                <td align="left">
                                    <asp:DropDownList runat="server" ID="dlQuanHuyen" ValidationGroup="w4u_Raovat" Width="200" />
                                </td>
                            </tr>
                        </table>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </td>
        </tr>
        <tr>
            <td align="right" style="font-weight: bold">
                <span class="Required">*</span>
                <asp:Literal runat="server" ID="Literal3" Text="Thời gian Đăng tin" meta:resourcekey="DiachiNha" />
                :
            </td>
            <td align="left">
                <asp:DropDownList ValidationGroup="w4u_Raovat" runat="server" ID="dlThoigianDangtin"
                    Width="200" CssClass="Textbox">
                    <asp:ListItem Value="5" Text="5 Ngày"></asp:ListItem>
                    <asp:ListItem Value="10" Text="10 Ngày"></asp:ListItem>
                    <asp:ListItem Value="15" Text="15 Ngày"></asp:ListItem>
                    <asp:ListItem Value="20" Text="20 Ngày"></asp:ListItem>
                    <asp:ListItem Value="25" Text="25 Ngày"></asp:ListItem>
                    <asp:ListItem Value="30" Text="30 Ngày" Selected="True"></asp:ListItem>
                    <asp:ListItem Value="60" Text="60 Ngày"></asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="td_Title" align="right">
                THÔNG TIN BĐS
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td align="right" style="font-weight: bold">
                <span class="Required">*</span>
                <asp:Literal runat="server" ID="lDiachiNha" Text="Địa chỉ BĐS" meta:resourcekey="DiachiNha" />
                :
            </td>
            <td align="left">
                <asp:TextBox ID="txtDiachiNha" ValidationGroup="w4u_Raovat" MaxLength="512" runat="server"
                    Width="250" />
                <asp:RequiredFieldValidator runat="server" ValidationGroup="w4u_Raovat" ID="RequiredFieldValidator3"
                    SetFocusOnError="true" ControlToValidate="dlTinhthanh" ErrorMessage="Phải chọn Tỉnh/Thành phố"
                    Display="none" />
            </td>
        </tr>
        <tr>
            <td align="right" style="font-weight: bold">
                <span class="Required">*</span>
                <asp:Literal runat="server" ID="lDientichDat" Text="Diện tích đất" meta:resourcekey="DientichDat" />
                :
            </td>
            <td align="left">
                <asp:TextBox ID="txtDientichDat" ValidationGroup="w4u_Raovat" MaxLength="256" runat="server"
                    Width="100" />
                <b>m<sup>2</sup></b>
                <asp:RequiredFieldValidator runat="server" ValidationGroup="w4u_Raovat" ID="RFVDientichdat"
                    SetFocusOnError="true" ControlToValidate="txtDientichDat" ErrorMessage="Nhập diện tích đất"
                    Display="None" />
                <asp:RegularExpressionValidator ValidationGroup="w4u_Raovat" runat="server" SetFocusOnError="true"
                    ID="RegularExpressionValidator2" ControlToValidate="txtDientichDat" ValidationExpression="^(([0-9.,\s])+)$"
                    ErrorMessage="Diện tích đất phải là kiểu số (VD: 300)" Display="none">
                </asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td align="right" style="font-weight: bold">
                <asp:Literal runat="server" ID="lDientichXD" Text="Diện tích Xây dựng" meta:resourcekey="DientichXD" />
                :
            </td>
            <td align="left">
                <asp:TextBox ID="txtDientichXD" ValidationGroup="w4u_Raovat" MaxLength="256" runat="server"
                    Width="100" /><b> m<sup>2</sup> </b>
                <asp:RegularExpressionValidator ValidationGroup="w4u_Raovat" runat="server" SetFocusOnError="true"
                    ID="RegularExpressionValidator3" ControlToValidate="txtDientichXD" ValidationExpression="^(([0-9.,\s])+)$"
                    ErrorMessage="Diện tích Xây dựng (VD: 250)" Display="none" />
            </td>
        </tr>
        <tr class="Hidden">
            <td align="right" style="font-weight: bold">
                <asp:Literal runat="server" ID="lDientichSD" Text="DientichSD" meta:resourcekey="DientichSD" />
                :
            </td>
            <td align="left">
                <asp:TextBox ID="txtDientichSD" ValidationGroup="w4u_Raovat" MaxLength="256" runat="server"
                    Width="100" />
            </td>
        </tr>
        <tr>
            <td align="right" style="font-weight: bold">
                <asp:Literal runat="server" ID="lSolau" Text="Số lầu" meta:resourcekey="Solau" />
                :
            </td>
            <td align="left">
                <asp:TextBox ID="txtSolau" ValidationGroup="w4u_Raovat" MaxLength="4" runat="server"
                    Width="100" />
            </td>
        </tr>
        <tr>
            <td align="right" style="font-weight: bold">
                <asp:Literal runat="server" ID="Literal1" Text="Số phòng" meta:resourcekey="SoPhong" />
                :
            </td>
            <td align="left">
                <asp:Literal runat="server" ID="lPhongNgu" Text="Ngủ" meta:resourcekey="PhongNgu" />:
                <asp:TextBox ID="txtPhongNgu" ValidationGroup="w4u_Raovat" MaxLength="4" runat="server"
                    Width="40" />
                <asp:RegularExpressionValidator ValidationGroup="w4u_Raovat" runat="server" SetFocusOnError="true"
                    ID="RegularExpressionValidator4" ControlToValidate="txtPhongNgu" ValidationExpression="^(([0-9])+)$"
                    ErrorMessage="Phòng ngủ phải là kiểu số (VD: 2)" Display="none">
                </asp:RegularExpressionValidator>
                &nbsp;
                <asp:Literal runat="server" ID="Literal2" Text="WC/Tắm" meta:resourcekey="PhongVS" />:
                <asp:TextBox ID="txtPhongVS" ValidationGroup="w4u_Raovat" MaxLength="4" runat="server"
                    Width="40" />
                <asp:RegularExpressionValidator ValidationGroup="w4u_Raovat" runat="server" SetFocusOnError="true"
                    ID="RegularExpressionValidator5" ControlToValidate="txtPhongVS" ValidationExpression="^(([0-9])+)$"
                    ErrorMessage="Phòng WC/Tắm phải là kiểu số (VD: 2)" Display="none">
                </asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td align="right" style="font-weight: bold">
                <asp:Literal runat="server" ID="lTinhtrangPL" Text="Tình trạng Pháp lý" meta:resourcekey="TinhtrangPL" />
                :
            </td>
            <td align="left">
                <southern:ddlTinhTrangPL ID="dlTinhTrangPL" ValidationGroup="w4u_Raovat" runat="server"
                    Width="168" CssClass="Textbox" />
            </td>
        </tr>
        <tr>
            <td align="right" style="font-weight: bold">
                <asp:Literal runat="server" ID="lHuongNha" Text="Hướng" meta:resourcekey="HuongNha" />
                :
            </td>
            <td align="left">
                <southern:ddlHuongNha ID="dlHuongNha" ValidationGroup="w4u_Raovat" runat="server"
                    Width="168" CssClass="Textbox" />
            </td>
        </tr>
        <tr>
            <td align="right" style="font-weight: bold">
                <asp:Literal runat="server" ID="lVitri" Text="Vị trí" meta:resourcekey="Vitri" />
                :
            </td>
            <td align="left">
                <asp:RadioButton runat="server" Checked="true" ValidationGroup="w4u_Raovat" GroupName="Vitri"
                    ID="rdoDuonglon" Text="Đường lớn" />
                &nbsp;
                <asp:RadioButton runat="server" ValidationGroup="w4u_Raovat" GroupName="Vitri" ID="rdoTronghem"
                    Text="Trong hẻm" />
            </td>
        </tr>
        <tr class="Hidden">
            <td align="right" style="font-weight: bold">
                <asp:Literal runat="server" ID="lDuongtruocNha" Text="DuongtruocNha" meta:resourcekey="DuongtruocNha" />
                :
            </td>
            <td align="left">
                <asp:TextBox ID="txtDuongtruocNha" ValidationGroup="w4u_Raovat" MaxLength="4" runat="server"
                    Width="250" />
            </td>
        </tr>
        <tr>
            <td align="right" style="font-weight: bold">
                <asp:Literal runat="server" ID="lGia" Text="Giá" meta:resourcekey="Giá" />
                :
            </td>
            <td align="left">
                <asp:TextBox ID="txtGia" ValidationGroup="w4u_Raovat" Font-Bold="true" ForeColor="Blue"
                    MaxLength="21" runat="server" Width="100" />
                <asp:RegularExpressionValidator runat="server" ValidationGroup="w4u_Raovat" SetFocusOnError="true"
                    ID="RegularExpressionValidator1" ControlToValidate="txtGia" ValidationExpression="^(([0-9.,\s])+)$"
                    ErrorMessage="Giá bạn nhập không hợp lệ" Display="none">
                </asp:RegularExpressionValidator>
                <southern:ddlDonVT ID="dlDonVT" ValidationGroup="w4u_Raovat" runat="server" Width="90"
                    CssClass="Textbox" />
                /&nbsp;
                <asp:DropDownList runat="server" ValidationGroup="w4u_Raovat" ID="dlGiaTren" Width="115"
                    CssClass="Textbox">
                    <asp:ListItem Value="m2" Text="mét vuông"></asp:ListItem>
                    <asp:ListItem Selected="True" Value="tongdientich" Text="Tổng diện tích"></asp:ListItem>
                    <asp:ListItem Value="Thang" Text="Tháng(cho thuê)"></asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td align="right" style="font-weight: bold">
                <span class="Required">*</span>
                <asp:Literal runat="server" ID="lTieude" Text="Tiêu đề" meta:resourcekey="Tieude" />
                :
            </td>
            <td align="left">
                <asp:TextBox ID="txtTieude" ValidationGroup="w4u_Raovat" MaxLength="2000" runat="server"
                    Width="400" />
                <asp:RequiredFieldValidator runat="server" ValidationGroup="w4u_Raovat" SetFocusOnError="true"
                    ID="RFVTieude" ControlToValidate="txtTieude" ErrorMessage="Phải nhập Tiêu đề tin rao"
                    Display="None" />
            </td>
        </tr>
        <tr>
            <td align="right" style="font-weight: bold" valign="top">
                <asp:Literal runat="server" ID="lMota" Text="Mô tả" meta:resourcekey="Mota" />
                :
            </td>
            <td align="left">
                <asp:TextBox ID="txtMota" Rows="5" TextMode="MultiLine" ValidationGroup="w4u_Raovat"
                    MaxLength="8000" runat="server" Width="400" />
            </td>
        </tr>
        <tr>
            <td align="right" style="font-weight: bold">
                <asp:Literal runat="server" ID="lHinh1" Text="Hình ảnh" meta:resourcekey="Hinh1" />
                :
            </td>
            <td align="left">
                <asp:FileUpload runat="server" ID="Hinh1" />
                <asp:HiddenField runat="server" ID="hHinh1" />
            </td>
        </tr>
        <tr class="Hidden">
            <td align="right" style="font-weight: bold">
                <asp:Literal runat="server" ID="lHinh2" Text="Hình 2" meta:resourcekey="Hinh2" />
                :
            </td>
            <td align="left">
                <asp:FileUpload runat="server" ID="Hinh2" />
                <asp:HiddenField runat="server" ID="hHinh2" />
            </td>
        </tr>
        <tr class="Hidden">
            <td align="right" style="font-weight: bold">
                <asp:Literal runat="server" ID="lHinh3" Text="Hình 3 " meta:resourcekey="Hinh3" />
                :
            </td>
            <td align="left">
                <asp:FileUpload runat="server" ID="Hinh3" />
                <asp:HiddenField runat="server" ID="hHinh3" />
            </td>
        </tr>
        <tr class="Hidden">
            <td align="right" style="font-weight: bold">
                <asp:Literal runat="server" ID="lHinh4" Text="Hình 4" meta:resourcekey="Hinh4" />
                :
            </td>
            <td align="left">
                <asp:FileUpload runat="server" ID="Hinh4" />
                <asp:HiddenField runat="server" ID="hHinh4" />
            </td>
        </tr>
        <tr class="Hidden">
            <td align="right" style="font-weight: bold">
                <asp:Literal runat="server" ID="lHinh5" Text="Hình 5" meta:resourcekey="Hinh5" />
                :
            </td>
            <td align="left">
                <asp:FileUpload runat="server" ID="Hinh5" />
                <asp:HiddenField runat="server" ID="hHinh5" />
            </td>
        </tr>
        <tr>
            <td class="td_Title" align="right">
                THÔNG TIN LIÊN HỆ
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td align="right" style="font-weight: bold">
                <span class="Required">*</span>
                <asp:Literal runat="server" ID="lHoten" Text="Họ tên" meta:resourcekey="Hoten" />
                :
            </td>
            <td align="left">
                <asp:TextBox ID="txtHoten" ValidationGroup="w4u_Raovat" MaxLength="256" runat="server"
                    Width="250" />
                <asp:RequiredFieldValidator runat="server" ValidationGroup="w4u_Raovat" SetFocusOnError="true"
                    ID="RFVHoten" ControlToValidate="txtHoten" ErrorMessage="Phải nhập Họ tên liên hệ"
                    Display="None" />
            </td>
        </tr>
        <tr>
            <td align="right" style="font-weight: bold">
                <span class="Required">*</span>
                <asp:Literal runat="server" ID="lDiachi" Text="Địa chỉ" meta:resourcekey="Diachi" />
                :
            </td>
            <td align="left">
                <asp:TextBox ID="txtDiachi" ValidationGroup="w4u_Raovat" MaxLength="1024" runat="server"
                    Width="250" />
                <asp:RequiredFieldValidator runat="server" ValidationGroup="w4u_Raovat" SetFocusOnError="true"
                    ID="RFVDiachi" ControlToValidate="txtDiachi" ErrorMessage="Phải nhập Địa chỉ liên hệ"
                    Display="None" />
            </td>
        </tr>
        <tr>
            <td align="right" style="font-weight: bold">
                <span class="Required">*</span>
                <asp:Literal runat="server" ID="lEmail" Text="Email" meta:resourcekey="Email" />
                :
            </td>
            <td align="left">
                <asp:TextBox ID="txtEmail" ValidationGroup="w4u_Raovat" MaxLength="256" runat="server"
                    Width="250" />
                <asp:RequiredFieldValidator runat="server" ValidationGroup="w4u_Raovat" SetFocusOnError="true"
                    ID="RFVEmail" ControlToValidate="txtEmail" ErrorMessage="Phải nhập địa chỉ Email"
                    Display="None" />
            </td>
        </tr>
        <tr>
            <td align="right" style="font-weight: bold">
                <span class="Required">*</span>
                <asp:Literal runat="server" ID="lDienthoai" Text="Điện thoại" meta:resourcekey="Dienthoai" />
                :
            </td>
            <td align="left">
                <asp:TextBox ID="txtDienthoai" ValidationGroup="w4u_Raovat" MaxLength="50" runat="server"
                    Width="250" />
                <asp:RequiredFieldValidator runat="server" ValidationGroup="w4u_Raovat" SetFocusOnError="true"
                    ID="RFVDienthoai" ControlToValidate="txtDienthoai" ErrorMessage="Phải nhập điện thoại"
                    Display="None" />
            </td>
        </tr>
        <tr>
            <td align="right" style="font-weight: bold">
                <asp:Literal runat="server" ID="lDidong" Text="Di động" meta:resourcekey="Didong" />
                :
            </td>
            <td align="left">
                <asp:TextBox ID="txtDidong" ValidationGroup="w4u_Raovat" MaxLength="50" runat="server"
                    Width="250" />
            </td>
        </tr>
        <tr class="Hidden">
            <td align="right" style="font-weight: bold">
                <asp:Literal runat="server" ID="lIsActive" Text="IsActive" meta:resourcekey="IsActive" />
                :
            </td>
            <td align="left">
                <asp:CheckBox ID="txtIsActive" ValidationGroup="w4u_Raovat" runat="server" Text="IsActive" />
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <asp:ImageButton runat="server" ValidationGroup="w4u_Raovat" ID="imgSave" ImageUrl="~/Images/btDangTinRao.gif"
                    OnClick="ImgSave_Click" />
            </td>
        </tr>
    </table>
    <br />
    <br />
</asp:Panel>
